<extend file='resource/admin/base'/>
<block name="content">
	<!-- TAB NAVIGATION -->
	<ul class="nav nav-tabs" role="tablist">
		<li class="active"><a href="#tab1">轮播图列表</a></li>
		<li><a href="{{u('post')}}" >轮播图添加</a></li>
	</ul>
	<table class="table table-hover">
		<thead>
		<tr>
			<th width="8%">编号</th>
			<th>标题</th>
			<th>排序</th>
			<th>缩略图</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>
		<foreach from="$field" value="$d">
			<tr>
				<td>{{$d['slide_id']}}</td>
				<td>{{$d['slide_title']}}</td>
				<td>{{$d['slide_orderby']}}</td>
				<td>
					<a href="{{__ROOT__ .'/'.$d['slide_thumb']}}">
						<img style="height: 50px" src="{{$d['slide_thumb']}}" alt="">
					</a>
				</td>
				<td>
					<div class="btn-group btn-group-sm">
						<a href="{{u('post',['slide_id'=>$d['slide_id']])}}" class="btn btn-success">编辑</a>
						<a href="javascript:;" onclick="remove({{$d['slide_id']}})" class="btn btn-danger">删除</a>
					</div>
				</td>
			</tr>
		</foreach>
		</tbody>
	</table>
	{{$field->links()}}
	<script>
        function remove(slide_id) {
            util.confirm('确定删除吗?',function(res){
                location.href = "{{u('remove')}}&slide_id=" + slide_id;
            })
        }

	</script>
</block>
